package com.newjiabo.applet.modules.service;

import com.newjiabo.common.core.domain.entity.SkiMember;
import com.newjiabo.common.ski.media.module.enums.MediaStatus;
import com.newjiabo.common.utils.StringUtils;
import com.newjiabo.ski.domain.SkiMemberBodyInfo;
import com.newjiabo.ski.domain.vo.MemberInfoVo;
import com.newjiabo.ski.service.ISkiMemberService;
import com.newjiabo.ski.service.MediaService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * {类内容}
 *
 * @author CaoMengHui.
 * @version 1.0
 * @since 2023/10/11 15:13
 */
@Service
public class AppletHomeService {

    @Resource
    private ISkiMemberService memberService;
    @Resource
    private MediaService mediaService;
    public MemberInfoVo getMemberInfo(String memberId, String snowFieldId) {
        SkiMember skiMember = memberService.selectSkiMemberById(memberId);
        MemberInfoVo memberInfoVo = new MemberInfoVo(skiMember,false);
        SkiMemberBodyInfo registerInfo = mediaService.getRegisterInfo(snowFieldId);
        if(MediaStatus.Normal.name().equals(registerInfo.getRegisterStatus())){
            memberInfoVo.setAttestationFlag(true);
        }
        return memberInfoVo;
    }
}
